<template>
  <div class="treeSearch">
    <a-input :placeholder="placeholder" allow-clear @input="goSearch">
      <template #prefix>
        <icon-search />
      </template>
    </a-input>
    <a-tree :data="treeData" />
  </div>
</template>

<script lang="ts">
import { toRefs } from 'vue';
import importConfig from './treeSearch';
export default {
  props: {
    placeholder: {
      type: String,
      default: '',
    },
    treeData: {
      type: Array,
      default: () => [],
    },
  },
  /**
   * @exports update:config 更新数据
   * @exports tapDate       触发查询方法
   */
  emits: ['goSearch'],
  setup(props, emits) {
    const { goSearch } = importConfig(props, emits);
    return {
      goSearch,
    };
  },
};
</script>

<style scoped lang="less">
.searchBar {
}
</style>
